Skip to main content

Create a Tariff

The billing service API serves as a helpful tool to control how much you charge your customers

Use Cases

  1. Subscription-Based Billing
  • A SaaS company wants to charge customers based on the number of API calls they make each month.
  1. Pay-Per-Use Model
  • A provider bills customers based on the number of Transactions.
POST 'apisandbox-billing-api.delfinance.com.br/billing-accounts'

Headers

Name                                         Description                                         
x-delfinance-api-keyRequired. API key

Body attributes

NomeTypeDescription
bankAccountstringRequired. Bank account that will be charged
feesobjectObject containing information about the fees
fees.transactionTypeIdenumWhich type of transaction your customer will be charged
- 7 - TED sent
- 8 - TED received
- 10 - Pix sent
- 11 - Pix received
- 12 - Refunded Pix received
- 13 - Refunded Pix sent
- 21 - TED refunded
- 43 - Pix administrative refund
- 78 - Refunded Pix sent (transaction undo)
- 133 - Pix debited via MED RDR (transaction undo)
- 9001 - Escrow monthly fee
- 9002 - API monthly fee
fees.pricenumberAmount to be charged by fee
fees.feeTypeenumWhich type of transaction your customer will be charged
- 7 - TED sent
- 8 - TED received
- 10 - Pix sent
- 11 - Pix received
- 12 - Refunded Pix received
- 13 - Refunded Pix sent
- 21 - TED refunded
- 43 - Pix administrative refund
- 78 - Refunded Pix sent (transaction undo)
- 133 - Pix debited via MED RDR (transaction undo)
- 9001 - Escrow monthly fee
- 9002 - API monthly fee
invoiceFrequencyobjectObject containing information on the frequency of tariff collection
invoiceFrequency.categoryenumThe frequency in which the customer will be charged
- minute - Charge will activate every minute
- hour - Charge will activate every hour
- day - Charge will activate every day
- week - Charge will activate every week
- month - Charge will activate every month
- year - Charge will activate every year
invoiceFrequency.amountnumberAmount that will be charged on defined frequency
startDatedateThe date when the fee calculation begins.
nextInvoiceAtdateThe date where the first payment will occur, after this date the frequency will set in

Example

{
"bankAccount": "123456",
"fees": [
{
"transactionTypeId": 10,
"price": 0.50,
"feeType": "fixed"
}
],
"invoiceFrequency": {
"category": "month",
"amount": 1
},
"startDate": "2023-01-01",
"nextInvoiceAt": "2023-02-01"
}

Response

On a sucessful response you will receive a status code of 204